<template>
	<view class="u-flex-col" style="height :calc(100vh - 44px)">
				<jmy-find-artison 
				    button_text="立即预约设计" 
					flow_chat="https://img.aibbyp.com/wechat/images/artison/worker/tabbar.png" 
					detail_img="https://img.aibbyp.com/wechat/images/artison/worker/bgs.png"
					:worker_type_id="type"
					:worker_id="worker_id"
					>
					<template v-slot:top>
						<view :class="bannerStyle" style="margin-bottom: -60rpx;"></view>
					</template>
					</jmy-find-artison >
	</view>
</template>

<script>
	import FindArtison from "@/components/jmy-find-artison/jmy-find-artison.vue"
	export default {
		data() {
			return {
				type: 2,
				bannerStyle: "banner",
				address: '',
				typeList: [],
				scrollLeft: 0,
			}
		},
	
		methods: {
			getDesignTypeInfo() {
				this.$api.get({
					url: '/jmy/worker_type/getListByType?type=2',
					success: res => {
						this.typeList = res
						for (let i = 0; i < res.length; i++) {
							if (i === 0) {
								this.type = res[i].id;
							}
						}
					}
				});
			}
		},
		components: {
			FindArtison
		},
		onLoad() {
			console.log(1234);
			this.getDesignTypeInfo();
		}
	}
</script>

<style>
	.container {
		background-color: rgb(245, 245, 245);

	}

	.content {
		padding: 0px 4% 20px 4%;
	}

	.banner {
		background-image: url("https://img.aibbyp.com/wechat/images/artison/design/shou.png");
		width: 100%;
		height: 535upx;
		background-position: right bottom, left top;
		background-repeat: repeat;
		background-size: cover;
	}

	.detail {
		padding: 5%;
		background-color: #FFFFFF;
		border-radius: 10px;

	}

	.add-task {
		width: 100%;
		height: 600upx;
		background-color: green;
		border-radius: 10px;
	}
</style>